package com.fan.controller;

import com.fan.aspect.SignatureValidation;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

/**
 * @author D-BJ-144
 * @description TestController
 * @Date 2025/2/14 10
 */
@Api(tags = "测试接口")
@RestController
public class TestController {

    @ApiOperation(value = "测试接口", notes = "测试接口1111")
    @ApiOperationSupport(order = 1)
    @PostMapping("/test")
    public String test(){
        return "test";
    }
    @ApiOperation(value = "测试接口1", notes = "测试接口1111111111")
    @ApiOperationSupport(order = 2)
    @PostMapping("/test1")
    public String test1(@ApiParam(value = "姓名", required = true) @RequestParam String name){
        return name;
    }

    @SignatureValidation
    @ApiOperation(value = "签名测试", notes = "签名测试")
    @ApiOperationSupport(order = 3)
    @PostMapping("/testSign/{sex}/{age}")
    public String testSign(@ApiParam(value = "姓名", required = true) @RequestParam String name,@RequestParam String www,
                           @PathVariable String age, @PathVariable String sex, @RequestBody Map<String,Object>  map){
        return name;
    }
}
